package com.success.application.ground.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import com.success.application.base.BaseRecyclerViewAdapter;
import com.success.application.ground.bean.Friend;
import com.success.application.ground.holder.FriendHolder;
import com.success.application.ground.holder.TopHolder;
import com.success.application.myapplication.R;

import static com.success.application.ground.adapter.FriendAdapter.VIEW_TYPE_TOP;

/**
 * Created by ChrisWong on 2017/1/17.
 */

public class OnlyFriendAdapter extends BaseRecyclerViewAdapter<Friend> {

    public OnlyFriendAdapter(Context context, int mode) {
        super(context, mode);
    }

    @Override
    protected RecyclerView.ViewHolder onCreateDefaultViewHolder(ViewGroup parent, int viewType) {
        View v = mInflater.inflate(R.layout.shop_help_item_list,parent,false);
        return new FriendHolder(v);
    }
//    @Override
//    public int getItemViewType(int position) {
//        if (position == 0 && (BEHAVIOR_MODE == ONLY_HEADER || BEHAVIOR_MODE == BOTH_HEADER_FOOTER))
//            return VIEW_TYPE_HEADER;
//        //在列表中追加一项，存放滚动图和快捷图标
//        if (mItems.size() > 0 && position == 0)
//            return VIEW_TYPE_TOP;
//        if (position + 1 == getItemCount() && (BEHAVIOR_MODE == ONLY_FOOTER || BEHAVIOR_MODE == BOTH_HEADER_FOOTER))
//            return VIEW_TYPE_FOOTER;
//        else{
//            //
//            return VIEW_TYPE_NORMAL;
//        }
//    }
    //父类已自动绑定，若有特殊需求才需要继承方法
//    @Override
//    protected void onBindDefaultViewHolder(RecyclerView.ViewHolder holder, Crime crime, int position) {
//        super.onBindDefaultViewHolder(holder,crime,position);
//    }
}
